Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.hw
Class ModuleInstance_Standard.MessageStruct_Variable

    java.lang.Object
      rdlc.hw.ModuleInstance_Standard.Message_Fixed
          rdlc.hw.ModuleInstance_Standard.Message_Variable
              rdlc.hw.ModuleInstance_Standard.MessageStruct_Variable

Enclosing class:
  ModuleInstance_Standard

    protected static class ModuleInstance_Standard.MessageStruct_Variable

extends ModuleInstance_Standard.Message_Variable

This class represents a struct where some of the fields down the line are variable size unions. This can result in data-depedant packing and unpacking which must take tags into account to avoid dead space in the resulting packed message.

Version:
  $Revision: 1.18 $
Author:
  Greg Gibeling

Field Summary
`protected java.util.List<Pair<Expression,java.util.List<java.lang.Integer>>>` | `crossProduct` The cross product list, this represents the most complicated part of the packing and unpacking.
`protected java.util.List<ModuleInstance_Standard.Message_Fixed>` | `fixedChildList` A list of the fixed width children of this struct.
`protected int` | `fixedWidth` The width of the fixed portion of this struct; those fields which do not vary.
`protected java.util.List<ModuleInstance_Standard.Message_Variable>` | `variableChildList` A list of the variable width children of this struct.
`protected int` | `variableWidth` The maximum of the variable portion of this struct.

Fields inherited from class rdlc.hw.ModuleInstance_Standard.Message_Variable
`nTags, tag2Width, tagExtWidth, tagWidth, widthWire`

Fields inherited from class rdlc.hw.ModuleInstance_Standard.Message_Fixed
`dataWire, instance, name, width`

Constructor Summary
`ModuleInstance_Standard.MessageStruct_Variable(java.lang.String _name, ModuleInstance_Standard _instance, Message message)`

Method Summary
`protected void` | `addToCrossProduct(Expression tagExpr, int fieldWidth, java.util.List<Pair<Expression,java.util.List<java.lang.Integer>>> oldCrossProduct)` Add a new tag expression and field width to the cross product.
`protected void` | `generateCrossProduct(int index)` Generate the cross product by adding in the variable width field with the given index.
`void` | `generatePack(ModuleParameterGroup portParamGroup, ModuleWireGroup packWireGroup, int widthBits, int extraWidth)` Generate the packing logic for this message object.
`void` | `generateUnpack(Expression source, ModuleWireGroup unpackWireGroup)` Generate the unpacking logic for this message object.

Methods inherited from class rdlc.hw.ModuleInstance_Standard.Message_Variable
`getWidthExpr`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fixedWidth

    protected int fixedWidth

  The width of the fixed portion of this struct; those fields which do not vary.

### variableWidth

    protected int variableWidth

  The maximum of the variable portion of this struct.

### fixedChildList

    protected java.util.List<ModuleInstance_Standard.Message_Fixed> fixedChildList

  A list of the fixed width children of this struct.

### variableChildList

    protected java.util.List<ModuleInstance_Standard.Message_Variable> variableChildList

  A list of the variable width children of this struct.

### crossProduct

    protected java.util.List<Pair<Expression,java.util.List<java.lang.Integer>>> crossProduct

  The cross product list, this represents the most complicated part of the packing and unpacking. Each entry in this list is a pair of a tag expression and a list of field widths. If the concatenated tags for all of the variable fields match the expression, then the list of widths will tell how wide each field actually is.

Constructor Detail

### ModuleInstance_Standard.MessageStruct_Variable

    public ModuleInstance_Standard.MessageStruct_Variable(java.lang.String _name,
                                                          ModuleInstance_Standard _instance,
                                                          Message message)

See Also:
  `Message_Fixed#Message_Fixed(String, ModuleInstance_Standard, Message)`

Method Detail

### addToCrossProduct

    protected void addToCrossProduct(Expression tagExpr,
                                     int fieldWidth,
                                     java.util.List<Pair<Expression,java.util.List<java.lang.Integer>>> oldCrossProduct)

  Add a new tag expression and field width to the cross product.

  Parameters:
    `tagExpr` - The tag expression.
    `fieldWidth` - The field width.
    `oldCrossProduct` - The old cross product.

### generateCrossProduct

    protected void generateCrossProduct(int index)

  Generate the cross product by adding in the variable width field with the given index. This is a tail call recursive function.

  Parameters:
    `index` - The index of the variable width field to add to the cross product.

### generatePack

    public void generatePack(ModuleParameterGroup portParamGroup,
                             ModuleWireGroup packWireGroup,
                             int widthBits,
                             int extraWidth)

  Description copied from class: `ModuleInstance_Standard.Message_Fixed`
  Generate the packing logic for this message object.

  Specified by:
    `generatePack` in class `ModuleInstance_Standard.Message_Fixed`
  Parameters:
    `portParamGroup` - The port's parameter group.
    `packWireGroup` - The wire group for all intermediate wires.
    `widthBits` - The number of bits of width to carry.
    `extraWidth` - The additional width requested by the link.
  See Also:
    `ModuleInstance_Standard.Message_Fixed.generatePack(ModuleParameterGroup, ModuleWireGroup, int, int)`

### generateUnpack

    public void generateUnpack(Expression source,
                               ModuleWireGroup unpackWireGroup)

  Description copied from class: `ModuleInstance_Standard.Message_Fixed`
  Generate the unpacking logic for this message object.

  Specified by:
    `generateUnpack` in class `ModuleInstance_Standard.Message_Fixed`
  Parameters:
    `source` - The expression which gives the source data for this message.
    `unpackWireGroup` - The wire group for all intermediate wires.
  See Also:
    `ModuleInstance_Standard.Message_Fixed.generateUnpack(Expression, ModuleWireGroup)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD